<!DOCTYPE html>
<html>
<head>
<include file="user/bookheadtop" />
<script charset="utf-8" type="text/javascript" src="__PUBLIC__/logic/shop/weixin/js/dialog.js" id="dialog_js"></script>
<link href="__PUBLIC__/logic/shop/weixin/css/dialog.css" rel="stylesheet" type="text/css">
<script charset="utf-8" type="text/javascript" src="__PUBLIC__/logic/shop/weixin/js/jquery_003.js"></script>
<script charset="utf-8" type="text/javascript" src="__PUBLIC__/logic/shop/weixin/js/zh-CN.js"></script>
<script charset="utf-8" type="text/javascript" src="__PUBLIC__/logic/shop/weixin/js/jquery_002.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/logic/shop/weixin/css/jquery.css">
<style>
.gift-box{
position:absolute;
top:10%;
right:2%;
}
.gift-box-main{
width:50px;
height:50px;
}
.gift-box-main>img{
width:100%;
}
</style>
</head>
<body>
<include file="user/bookhead" />
<div class="content" style="top: 45px;">
    <h3 class="membertop">
       <p class="my_name"><a href="#">  {:session('P.nickname')}</a></p>
       <p class="my_address"><a href="{:U('User/bookaddress')}">收货地址管理</a></p>
    </h3>
<div class="gift-box"><a href="{:U('User/hongbaoprofile')}"><div class="gift-box-main"><img src="__PUBLIC__/logic/shop/images/giftimg.png"/></div></a></div>
    <ul class="buyer_stat">
          <li class="btn_1 <if condition='$status eq 1'>active</if> "><a href="{:U('User/bookprofile',array('status'=>1))}">待付款</a><span>待付款</span></li>        
          <li class="btn_2 <if condition='$status eq 2'>active</if> "><a href="{:U('User/bookprofile',array('status'=>2))}">待发货</a><span>待发货</span></li>
          <li class="btn_3 <if condition='$status eq 3'>active</if>"><a href="{:U('User/bookprofile',array('status'=>3))}">待收货</a><span>待收货</span></li>
          <li class="btn_4 <if condition='$status eq 4'>active</if>"><a href="{:U('User/bookprofile',array('status'=>4))}">已完成</a><span>已完成</span></li>
    </ul>
	<script type="text/javascript">
    $(function(){
    $(".buyer_stat > li a").each(function() {
                href="http://store.weiapps.cn/"+$(this).attr("href");
                if(window.location.href==href){
                    $(this).parent("li").addClass("active");
                }
            });
    });
    </script>
    <div class="wrap">
        <div class="public">
            <notempty name="item_orders">
             <volist name='item_orders' id='vo' >
            <div class="order_form">
                    <p class="num">订单号: {$vo.orderId}</p>
                    <volist name='vo.items' id='item' >
                    <div class="con">
                        <p class="ware_pic"><a href="{:U('Article/detail',array('id'=>$item['itemId']))}" ><img src="{$item['img']}" height="80" width="80"></a></p>
                        <p class="ware_text"><a href="{:U('Article/detail',array('id'=>$item['itemId']))}">{$item.title}</a><br><span class="attr"></span></p>
                        <p class="price">价格: <span>¥{$item.price}</span></p>
                        <p class="amount">数量: <span>{$item.quantity}</span></p>
                    </div>
                  </volist>
                    <div class="clear"></div>
                    <div class="foot">
                        <p class="time">添加时间:{$vo.add_time|date='Y-m-d H:i:s',###}</p>
                         <div class="handle">
                            <div style="float:left;">
                                总额: <b id="order118_order_amount">¥{$vo.order_sumPrice}&nbsp;&nbsp;</b>
                            </div>   
                         <switch name="vo.status" >
                         <case value="1"><!--待付款 -->
                           <a href="{:U('Shop/pay',array('orderId'=>$vo['orderId']))}?showwxpaytitle=1" id="order118_action_pay" class="btn">付款</a>
                          
                            <a href="{:U('User/cancelOrder',array('orderId'=>$vo['orderId']))}" id="order118_action_cancel"> 取消订单</a>
                            <a href="{:U('User/checkOrder',array('orderId'=>$vo['orderId'],'status'=>$status))}" >查看订单</a>
                         </case>
                         <case value="2"><!--待发货 -->
                            <a href="{:U('User/checkOrder',array('orderId'=>$vo['orderId'],'status'=>$status))}" >查看订单</a>
                         </case>
                         <case value="3"><!-- 待收货 -->
                            <a href="{:U('User/confirmOrder',array('orderId'=>$vo['orderId'],'status'=>$status))}" id="order118_action_confirm" >确认收货</a>
                            <a href="{:U('User/checkOrder',array('orderId'=>$vo['orderId'],'status'=>$status))}" >查看订单</a>
                         </case>
                        <default />
                         <a href="{:U('User/checkOrder',array('orderId'=>$vo['orderId'],'status'=>$status))}" >查看订单</a>
                        </switch>                     
                        </div>
                    </div>
            </div>
            </volist>
            <else/>
              <div class="order_form member_no_records"><span>没有符合条件的记录</span></div>
             </notempty>
            <div class="order_form_page"> <div class="page"></div></div>
            <div class="clear"></div>
        </div>
        <div class="wrap_bottom"></div>
    </div>     
    <div class="wrap_line margin1" style="display:none;">
            <div class="public_index">
                <div class="information_index">
                    <div class="awoke">
                        您目前还没有已生成的订单<br>去<a href="#">商城首页</a>，挑选喜爱的商品，体验购物乐趣吧。
                    </div>
                </div>
            </div>
            <div class="wrap_bottom"></div>
        </div>
    <div class="clear"></div>
</div>
</body>
<include file="Public/weixinjs"/>
</html>